#include "GlobalConstants.h"

// 定义常量
const unsigned long GlobalConstants::WATCHDOG_TIMEOUT = 8000; // 8 秒
const unsigned long GlobalConstants::STARTUP_CHECK_TIME = 8000; // 10 秒
// 日志输出时间间隔
const unsigned long GlobalConstants::LOG_INTERVAL = 5000;
// 定义按钮 1IO2 引脚
const int GlobalConstants::btn1Pin = 4;
// 定义常量
const char* GlobalConstants::SOFTAP_SSID = "esp01-config";
const char* GlobalConstants::SOFTAP_PASSWORD = "12345678";
// 上次日志记录时间
unsigned long GlobalConstants::lastLogTime = 0;
// appLoopStart启动 未启动前预留5秒io操作触发web配网，或者下载系统等，
bool GlobalConstants::appLoopStart = false;

// 全局变量，用于标记是否开启 Web 配网服务
bool GlobalConstants::startWebConfig = false;
// 标记 Wi-Fi 是否连接成功
bool GlobalConstants::wifiConnected = false;

int GlobalConstants::reconnectAttempts = 0;
// NTP Server settings
const char *GlobalConstants::ntp_server = "pool.ntp.org";     // Default NTP server
// const char* GlobalConstants::ntp_server = "cn.pool.ntp.org"; // Recommended NTP server for users in China
const long GlobalConstants::gmt_offset_sec = 28800;            // GMT offset in seconds (adjust for your time zone)
const int GlobalConstants::daylight_offset_sec = 0;        // Daylight saving time offset in seconds
std::atomic<int> GlobalConstants::syncTimeOk = 0;